package org.geektimes.configuration.micro.config.converter;

import org.eclipse.microprofile.config.spi.Converter;

public abstract class AbstractConverter<T> implements Converter<T> {

    @Override
    public T convert(String value) throws IllegalArgumentException, NullPointerException {
        if (null == value){
            throw new NullPointerException("The value must not be null!");
        }
        return doConverter(value);
    }

    abstract T doConverter(String value);
}
